The magnetic sector of SU(N) Yang-Mills theory at finite temperature is studied. At low temperatures, T<2T_c, the analytic expressions for the temperature dependence of the magnetic correlator, of the magnetic gluon condensate and of the spatial string tension are obtained. Fair agreement with lattice calculations for spatial string tension is obtained for SU(2) and SU(3) gauge theories. The relative contribution given by non-zero Matsubara modes to the spatial string tension is calculated. At T=2T_c this contribution is of the order of 5%. The behavior of magnetic correlator at high temperatures is investigated and it is shown that gluo-magnetic condensate increases with temperature as (T)= const g^8(T) T^4.